package cn.wen233.iocdemo.runner;

import cn.wen233.iocdemo.infrustructure.util.MqttChannel;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 启动加载类
 * @author wenei
 * @date 2021-06-23 11:00
 */
@Component
public class AppStartRunner implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        // 加载MqttChannel类，即执行其静态初始化方法
        Class.forName(MqttChannel.class.getName());
    }
}
